package model.Actions;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import view.ViewFunctions;
import DB.Connection.DBConnectionManager;

import commons.Entities.Review;

public class getCharacterReviewsAction implements Runnable {

	private static final Log logger = LogFactory.getLog(addCharacterCommentAction.class);

	private Integer characterID;

	public getCharacterReviewsAction(Integer characterID) {
		this.characterID = characterID;
	}

	@Override
	public void run() {
		logger.info("getCharacterReviewsAction starting...");

		Review review = DBConnectionManager.get().getCharacterReview(characterID);
		ViewFunctions.get().updateGUIWithCharacterReview(review, characterID);

		logger.info("getCharacterReviewsAction ended.");
	}
}
